from flask_script import Manager
from show import app
from app.exts import db
from flask_migrate import Migrate,MigrateCommand
from app.model.Author import Author
from app.model.Poem import Poem

manager=Manager(app)

Migrate(app,db)

manager.add_command('db',MigrateCommand)

@manager.command
def check():
    user=Author.query.filter_by(id=1).first()
    print(user.id,user.name,user.img)

# manager.add_command("runserver", Server())

if __name__=='__main__':
    manager.run()